package com.huawei.iocc.goods.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author 黄后林
 * @date 2022-11-03 09:23:53
 * @note 程序员是用代码喂出来的
 *
 * CREATE TABLE goods (
 *   id bigint NOT NULL AUTO_INCREMENT COMMENT '商品编号',
 *   goodsName varchar(512) NOT NULL COMMENT '商品名称',
 *   billStatus int NOT NULL COMMENT '订单状态',
 *   goodsDistrict int NOT NULL  COMMENT '商品区域',
 *   goodsPrice decimal NOT NULL  COMMENT '商品价格',
 *   goodsCount bigint NOT NULL  COMMENT '商品数量',
 *   creationTime date NOT NULL  COMMENT '创建时间',
 *   PRIMARY KEY (`id`)
 * );
 */

@Data
@Table(name="goods")
public class GoodsEntity {


    @Id
    @Column(name = "id")
    private Long id;


    @Column(name = "goodsName")
    private String goodsName;

    // 【 0-待处理 1-处理中 2-已处理 】
    @Column(name = "billStatus")
    private Integer billStatus;


    // 【 0-待处理 1-处理中 2-已处理 】  billStatusName在表中没有对应的列
    @Transient
    private String billStatusName;

    // 1-朝阳 2-海淀 3-丰台 4-西城
    @Column(name = "goodsDistrict")
    private Integer goodsDistrict;

    @Transient
    private String goodsDistrictName;

    @Column(name = "goodsPrice")
    private Double  goodsPrice;

    @Column(name = "goodsCount")
    private Long   goodsCount;

    @Column(name = "creationTime")
    private String  creationTime;



}
